﻿using System;
using EasyMvc.Config;

namespace EasyMvc.Web.Common
{
    public class MWebConfigContext : ConfigContext
    {
        private bool enableCaching;

        public MWebConfigContext()
            :this(true)
        {
        }

        public MWebConfigContext(bool enableCaching = false)
            : base()
        {
            this.enableCaching = enableCaching;
        }

        public override T Get<T>(string index = null)
        {
            //if (!this.enableCaching)
            //    return base.Get<T>(index);

            //暂时不实现缓存
            return base.Get<T>(index);
            
        }
    }
}
